package org.klout4j;

import java.util.Map;

public class KloutUser implements java.io.Serializable {

	private static final long serialVersionUID = 1L;

	long twitterId;
    String twitterScreenName;
    KloutScore score;

    public KloutUser() {}

    @SuppressWarnings("unchecked")
	public KloutUser(Map<String,Object> attributes) {
        twitterId = Long.parseLong(attributes.get("twitter_id").toString());
        twitterScreenName = (String)attributes.get("twitter_screen_name");
    	score = new KloutScore((Map<String,Object>)attributes.get("score"));
    }

    public long getTwitterId() {
        return twitterId;
    }
    public void setTwitterId(long twitterId) {
        this.twitterId = twitterId;
    }

    public String getTwitterScreenName() {
        return twitterScreenName;
    }
    public void setTwitterScreenName(String twitterScreenName) {
        this.twitterScreenName = twitterScreenName;
    }

    public KloutScore getScore() {
        return score;
    }
    public void setScore(KloutScore score) {
        this.score = score;
    }

    public String toString() {
        return "KloutUser[twitterId=" + twitterId +
            ",twitterScreenName=" + twitterScreenName +
            ",score=" + score +
            "]";
    }
}
